class CmdsArea extends Gui {

  __New(parent) {
    super.__New('-Caption -Resize +Parent' parent)
    this.SetFont('s13', 'consolas')
    this.BackColor := 'F4FAFE'
    this.MarginX := this.MarginY := 0

    this.topText := this.AddText('Backgroundd6e39f w300')
    this._Init()
    DllCall('SetParent', 'ptr', this.Hwnd, 'ptr', parent)
  }

  static getIns(hwnd) {
    static ins := CmdsArea(hwnd)
    return ins
  }

  _Init() {
    cmds := MeowTool.GetCmdList()
    for v in cmds {
      if v.letter = '_'
        continue
      words := v.words.filter(v => !Mgr.i.Has(v))
      if !words.Length
        continue
      this.AddText('Backgroundbecada w25 x0 y+2 Section', v.letter).SetFont('bold')
      this.AddText('Backgrounddee7da w273 x+2 ', words.join(', ')).SetFont('')
    }
  }

  Show(x) {
    this.topText.Text := TruncatedString(History.hist.Length ? History.hist.at(-1) : '', 25)
    super.Show(Format('x{} y{} {}', x, 57, 'NA'))
    this.Restore()
  }

  getH() {
    this.GetPos(, , , &h)
    return h
  }

}